package cn.itsource.ymcc.web.controller;

import cn.itsource.ymcc.domain.MessageStation;
import cn.itsource.ymcc.result.JSONResult;
import cn.itsource.ymcc.service.ICreateTokenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class TokenController {
    @Autowired
    private ICreateTokenService createTokenService;
    @RequestMapping(value="/createToken/{id}",method= RequestMethod.GET)
    public JSONResult createToken(@PathVariable("id") Long id){
        String token = createTokenService.createToken(id);
        return JSONResult.success(token);
    }
}
